#ifndef AVALON_MESSAGE_HPP
#define AVALON_MESSAGE_HPP
#include <boost/function.hpp>
#include "Avalon/IO/IO.hpp"
#include "Avalon/Serialization/Serialization.hpp"
#include "Avalon/Services/Services.hpp"

namespace Avalon {
namespace Services {

  /*! \class Message
      \brief Abstract base class for a message.
   */
  class Message {
    public:
      virtual ~Message();

    protected:

      //! Emits a signal for this Message.
      /*!
        \param slot The slot to call.
        \param protocol The protocol which received the Message.
      */
      virtual void EmitSignal(boost::function_base* slot,
        ServiceProtocol* protocol) = 0;

      virtual void Shuttle(Serialization::DataShuttle* shuttle,
        unsigned int version) = 0;

    private:
      friend class Serialization::DataShuttle;
      friend class ServiceProtocol;
  };
}
}

#endif // AVALON_MESSAGE_HPP
